package cn.zwxky.android.user.Utils;

import com.zgscwjm.lsfbbasetemplate.LsfbActivity;
import com.zgscwjm.lsfbbasetemplate.annotation.ContentView;
import com.zgscwjm.lsfbbasetemplate.annotation.ViewInject;
import com.zgscwjm.lsfbbasetemplate.view.webview.LsfbWebview;

import cn.zwxky.android.user.R;

/**
 * Created by Administrator on 2017/3/21 0021.
 */

@ContentView(R.layout.commweb)
public class WebActivity extends LsfbActivity {

    @ViewInject(R.id.webview)
    private LsfbWebview webview;
    private String url;
    private String name;

    @Override
    public void initView() {
        // ~~~ 获取参数
        url = getIntent().getStringExtra("url");
        if (getIntent().getStringExtra("title") != null) {
            name = getIntent().getStringExtra("title");
            inittitle(name);
        } else {
            inittitle("详细内容");
        }
        webview.loadUrl(url);
    }

    @Override
    public void initEvent() {

    }

    @Override
    public void initData() {

    }

    private void inittitle(String title) {
//        LsfbTitleBar titleBar=LittleUtils.setsimpletitlebar(this, title);
        LittleUtils.setsimpletitlebar(this, title);
    }
}
